package net.kerp
{
	/**
	 * @private
	 */
	public class ToddUtils
	{
		/**
		 * @private
		 */
		public function ToddUtils()
		{
		}
		
		/**
		 * @private
		 */
		public static function randomNum(min:Number, max:Number):Number
		{
			if (max < min) {
				var temp:Number = max;
				max = min;
				min = temp;
			}
			
			return min + Math.random()*(max-min);
			
			
		}
		
		
		/**
		 * Returns an integer between min and max _inclusive_
		 * @param min: The smaller of the two integers
		 * @param max: The larger of the two integers
		 * @return An int between min and max inclusive
		 * 
		 */
		public static function randomInt(min:int, max:int):int
		{
			if (max < min) {
				var temp:int= max;
				max = min;
				min = temp;
			}
			
			return min + Math.floor(Math.random()*(1 + max-min));
			
			
		}
		
	}
}